import Layout from '@/views/layout/layout_affair'

import Affair from '@/views/affair/affair'
import EventList from '@/views/affair/event/list'
import EventItem from '@/views/affair/event/item'
import EventAccept from '@/views/affair/event/accept'
import EventDeal from '@/views/affair/event/deal'
import EventComplete from '@/views/affair/event/complete'
import TaskList from '@/views/affair/task/list'
import TaskItem from '@/views/affair/task/item'
import TaskAccept from '@/views/affair/task/accept'
import TaskReview from '@/views/affair/task/review'
import PatrolRecord from '@/views/affair/patrol/record'
import PatrolCounty from '@/views/affair/patrol/county'
import PatrolTown from '@/views/affair/patrol/town'
import PatrolVillage from '@/views/affair/patrol/village'
import ControlEngin from '@/views/affair/control/engin'
import ControlPollut from '@/views/affair/control/pollut'

import AssessDept from '@/views/affair/assess/dept'
import AssessChief from '@/views/affair/assess/chief'
import AssessMonitor from '@/views/affair/assess/monitor'
import AssessAvg from '@/views/affair/assess/avg'
import AssessOverallmerit from '@/views/affair/assess/overallmerit'
import AssessUpdownload from '@/views/affair/assess/updownload'
/*河长事务管理 */
const affairRouter=    { 
  path:'/affair',
  name:'affair',
  component:Layout,
  redirect:'/affair/event',
  meta: {
    requiresAuth: true
  },
  children:[
    {
      path:'/affair/event',
      name:'事件管理',
      component:Affair,
      iconCls: 'iconfont icon-event',
      menuShow: true,
      redirect:'/affair/event/list',
      children:[
        {path:'/affair/event/list',component:EventList,name:'事件列表',menuShow:true},
        {path:'/affair/event/item',component:EventItem,name:'事件类别管理',menuShow:true},
        {path:'/affair/event/accept',component:EventAccept,name:'事件受理',menuShow:true},
        {path:'/affair/event/deal',component:Affair,name:'事件处置',menuShow: true,redirect:'/affair/event/deal/index',children:[
          {path:'/affair/event/deal/index',component:EventDeal},
          {path:'/affair/event/deal/sh',component:()=>import('@/views/affair/event/deal_detail_sh.vue')},
          {path:'/affair/event/deal/db',component:()=>import('@/views/affair/event/deal_detail_db.vue')}
        ],menuShow:true},
        {path:'/affair/event/complete',component:EventComplete,name:'已办事件',menuShow:true},
      ]
    },
    {
      path:'/affair/task',
      name:'任务管理',
      component:Affair,
      iconCls: 'iconfont icon-icon-test',
      menuShow: true,
      children:[
        {path:'/affair/task/list',component:TaskList,name:'任务列表',menuShow:true},
        {path:'/affair/task/item',component:TaskItem,name:'任务类别管理',menuShow:true},
        {path:'/affair/task/accept',component:TaskAccept,name:'任务受理',menuShow:true},
        {path:'/affair/task/review',component:Affair,name:'任务处置审核',menuShow: true,redirect:'/affair/task/review/index',children:[
          {path:'/affair/task/review/index',component:TaskReview},
          {path:'/affair/task/review/tab',component:()=>import('@/views/affair/task/reviewtab.vue')},
        ],menuShow:true},
        // {path:'/affair/task/review',component:TaskReview,name:'任务处置审核',redirect:'/affair/task/review/index',menuShow:true,children:[
        //   {path:'/affair/task/review/index',compontent:TaskReview},
        //   {path:'/affair/task/review/tab',compontent:()=>import('@/views/affair/task/reviewtab.vue')}
        // ]},
        {path:'/affair/task/flow',component:()=>import('@/views/affair/task/flow.vue'),name:'任务处理流程',menuShow:true},
      ]
    },
    {
      path:'/affair/patrol',
      name:'巡河管理',
      component:Affair,
      iconCls: 'iconfont icon-xuncha',
      menuShow: true,
      children:[
        {path:'/affair/patrol/record',component:PatrolRecord,name:'巡河记录详情',menuShow:true},
        {path:'/affair/patrol/county',component:PatrolCounty,name:'区县级河长巡河',menuShow:true},
        {path:'/affair/patrol/town',component:PatrolTown,name:'镇级河长巡河',menuShow:true},
        {path:'/affair/patrol/village',component:PatrolVillage,name:'村级河长巡河',menuShow:true},
      ]
    },
    {
      path:'/affair/control',
      name:'河道防治管理',
      component:Affair,
      iconCls: 'iconfont icon-binghaifangzhi',
      menuShow: true,
      children:[
        {path:'/affair/control/pollut',component:ControlPollut,name:'污染防治',menuShow:true},
        {path:'/affair/control/engin',component:ControlEngin,name:'工程管理',menuShow:true}
      ]
    },
    {
      path:'/affair/assess',
      name:'考核管理',
      component:Affair,
      iconCls: 'iconfont icon-kaohe',
      menuShow: true,
      children:[
        {path:'/affair/patrol/dept',component:AssessDept,name:'区县牵头部门考核',menuShow:true},
        {path:'/affair/patrol/chief',component:AssessChief,name:'河长考核',menuShow:true},
        {path:'/affair/control/monitor',component:AssessMonitor,name:'监察员考核',menuShow:true},
        {path:'/affair/control/avg',component:AssessAvg,name:'平均分',menuShow:true},
        {path:'/affair/control/overallmerti',component:AssessOverallmerit,name:'河长制综合评价',menuShow:true},
        {path:'/affair/control/updownload',component:AssessUpdownload,name:'上传下达',menuShow:true},
      ]
    },
  ]
}
export default affairRouter